
from sqlalchemy import Column, String, Integer, DateTime, func

from utils.work_db import Base


class WeixinToken(Base):
    __tablename__ = 'weixin_token'
    appid = Column(String, primary_key=True)
    app_type = Column(String)
    secret = Column(String)
    access_token = Column(String)
    access_expire_time = Column(Integer)
    refresh_token = Column(String)
    refresh_expire_time = Column(Integer)
    create_time = Column(DateTime, default=func.now())
    update_time = Column(DateTime, default=func.now())
